#ifndef PROTOCOL_H
#define PROTOCOL_H
#include <QtGlobal>

#pragma pack(push,1)
struct ProtocolHeader {
    quint8 sync1;
    quint8 sync2;
    quint8 source;
    quint8 dataLength;
};

struct CarData {
    qint32 longitude;
    qint32 latitude;
    quint16 heading;
    quint8 count;
    quint8 label1; qint16 deviation1;
    quint8 label2; qint16 deviation2;
    quint8 label3; qint16 deviation3;
};

struct DroneData {
    qint32 longitude;
    qint32 latitude;
    quint16 altitude;
    quint16 heading;
    qint16 roll;
    qint16 pitch;
    quint8 count;
    quint8 label1; quint16 target1X; quint16 target1Y;
    quint8 label2; quint16 target2X; quint16 target2Y;
    quint8 label3; quint16 target3X; quint16 target3Y;
};
#pragma pack(pop)

#endif // PROTOCOL_H
